home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 276-300 / 288 / scripit / con.demo < prev    next >
Text File  |  1995-03-14  |  2KB  |  98 lines

  1. ;; Console Demo
  2. ;; A Scripit script demoing console control facilities in Scripit.
  3. ;;
  4. ;; By: Khalid Aldoseri.
  5. ;;
  6. ;; Requires Scripit 1.00b or higher.
  7.  
  8.  
  9. BEGIN
  10. ;; Open a console using the provided settings.
  11. con open "CON:25/25/520/150/Scripit Console Demo!"
  12. ;; Set color to 3 and style to 1 (bold).
  13. con style 33;1
  14. ;; Move cursor to 8,20
  15. con move 8,20
  16. ;; Type some text here.
  17. con echo "Scripit Console Control Demo"
  18. con move 11,20
  19. ;; Reset style to 0 (normal)
  20. con style 0
  21. con text "Normal "
  22. ;; Change style to 1 (bold)
  23. ;; Note:  You should always reset the style by using 0; then then new style
  24. con style 0;1
  25. con text "Bold "
  26. ;; Change style to 3 (italic)
  27. con style 0;3
  28. con text "Italic "
  29. ;; Change style to 4 (underline)
  30. con style 0;4
  31. con text "Underlined"
  32. wait
  33. ;; Turn cursor off.
  34. con cursoroff
  35. ;; Move to top of console.
  36. con move
  37. wait 50
  38. ;; Turn cursor on, wait, then off again.
  39. con cursoron
  40. wait
  41. con cursoroff
  42. ;; Move to line 11
  43. con move 11,0
  44. ;; Delete 2 characters from here.
  45. con delchar 2
  46. wait 20
  47. ;; Move to 11,24
  48. con move 11,24
  49. ;; Insert 1 space
  50. con inschar
  51. wait 20
  52. ;; Move cursor to the right 7 times
  53. con right 7
  54. con inschar
  55. wait 20 
  56. con right 8
  57. con inschar
  58. wait 20 
  59. ;; Scroll all lines up 6 times.
  60. con scrollup 6
  61. wait 20
  62. ;; Scroll all lines down 10 times.
  63. con scrolldown 10
  64. wait 20
  65. con scrollup 10
  66. wait 20
  67. con scrolldown 10
  68. wait 20
  69. con scrollup 10
  70. con move 9,3
  71. con style 0;3
  72. con text "Scripit"
  73. con style 0
  74. con echo " can control consoles via a simple command language."
  75. wait
  76. con move 11,0
  77. con echo "    Its commands can open/close consoles, clear, echo text,"
  78. con echo "    move the cursor to any specific place, or step by step,"
  79. con echo "    scroll the text up or down, insert & delete characters"
  80. con echo "    and lines, turn the cursor on and off, change the style"
  81. con echo "    (normal, bold, italic or underline) or any combination"
  82. con echo "    of those, or even change the text color!"
  83. wait 500
  84. con move 0,0
  85. con scrolldown 10
  86. con scrollup 6
  87. con move 12,28
  88. con style 0;2
  89. con echo "End of demo!"
  90. con move 15,16
  91. con style 0;1
  92. con echo "Hit Control+Left Mouse button to end."
  93. wait 2000
  94. ;; Close the console.
  95. ;; Note: This is done automatically by Scripit anyway when the script
  96. ;; terminates.
  97. con close
  98.